package 测试类;

import java.util.Arrays;
import java.util.Scanner;

public class test8 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		double[] s = new double[n*5];
		double[] x = new double[5];
		int jisu = 0;
		double pinjun = 0;
		double res = 0;
		for (int i = 0; i < s.length; i++) {
			s[i] = sc.nextDouble();
		}
		for (int i = 0; i < s.length; i+=5) {
			for (int j = i; j < i+5; j++) {
				x[jisu] = s[j];
				jisu++;
			}
			Arrays.sort(x);
			pinjun = (x[1]+x[2]+x[3])/3;
			if (pinjun > res){
				res = pinjun;
			}
			jisu = 0;
		}
		System.out.printf("%.2f",res);
	}
}
